{% load i18n %}
{% load person_tags %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>{% if site_name %}{{ site_name }} : {% endif %}{% block head_title %}{% endblock %}</title>
        <!--[if IE]><style>
            div {
                zoom: 1; /* trigger hasLayout */
            }
        </style><![endif]-->
        <link rel="stylesheet" href="{{ MEDIA_URL }}base.css" />        {% if LANGUAGE_BIDI %}
        <style type="text/css" media="screen">
            div.right_panel {
                float: left; /* hotfix for sidebar */
            }
        </style>
        {% endif %}
        {% block extra_head %}
        {% endblock %}
    </head>

    <body>
      <div id="head">
      <div id="masthead">
        {% block logo_link_image %}{% endblock %}
        {% if user.is_authenticated %}
	  Welcome, <a href="{% url person_detail object_id=user.id %}">{{ user.username }}</a> ({% person_status user %}).
	{% else %}
	  <a href="{% url login %}?next=/">Login</a>
	{% endif %}
      </div>

      <div id="tabs" {% block tab_id %}{% endblock %}>
	{% block tabs %}
	{% endblock %}
      </div>
      </div>
      
      <div id="subnav" class="clearfix">{% block subnav %}&nbsp;{% endblock %}</div>
        
        <div id="body">
            {% if messages %}
                <ul id="messages">
                    {% for message in messages %}
                    <li id="message_{{ forloop.counter }}"><a href="#" onclick="$('#message_{{ forloop.counter }}').fadeOut(); return false;"><small>{% trans "clear" %}</small></a> {{ message }}</li>
                    {% endfor %}
                </ul>
            {% endif %}
            
            {% block body %}
            {% endblock %}
            
        </div>
        
        <div id="footer">{% block footer %}{% endblock %}</div>
        
        {% block extra_body %}
        {% endblock %}
    </body>
</html>
